package com.ft.oa.domain.customer;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ft.oa.utils.SecurityUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value = "customer_synergy",autoResultMap = true)
public class CustomerSynergy {

  @TableId(type = IdType.AUTO)
  /**
   * 维护id
   */
  private Long id;
  /**
   * 公司名称
   */
  private String name;
  /**
   * 协同项目名称
   */
  private String synergyProject;
  /**
   * 项目类型
   */
  private String projectType;
  /**
   * 项目金额
   */
  private BigDecimal money;
  /**
   * 协同状态
   */
  private Integer status;
  /**
   * 协同时间
   */
  @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
  private Date synergyDate ;
  /**
   * 协同备注
   */
  private String remark;
  /**
   * 数据状态
   */
  private Integer dataStatus;

  /**
   * 公司id
   */
  private Integer customerId;

  @TableField(exist = false)
  private String synergyStatus;

  /**
   * 创建人id
   */
  private Long creator = SecurityUtils.getCurrentUser().getId();

  /**
   * 创建时间
   */
  @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
  private LocalDateTime createTime = LocalDateTime.now();

  /**
   * 修改时间
   */
  @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
  private LocalDateTime updateTime = LocalDateTime.now();

  /**
   * 修改人id
   */
  private Long editor = SecurityUtils.getCurrentUser().getId();

}
